﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WeChatParking.Entity
{
    /// <summary>
    /// 微信接口返回
    /// </summary>
    public class WxApiResult
    {
        /// <summary>
        /// 错误码
        /// </summary>
        public string errcode { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string errmsg { get; set; }

        public long id { get; set; }

        /// <summary>
        /// 是否是accesstoken过期
        /// </summary>
        /// <returns></returns>
        public bool IsAccessTokenTimeout()
        {
            return string.Equals(errcode, "40014");
        }
    }

    public class WxMsgApiResult : WxApiResult
    {
        public long msgid { get; set; }

        public string invaliduser { get; set; }

        public string invalidparty { get; set; }

        public string invalidtag { get; set; }
    }
}
